// @ts-ignore
/* eslint-disable */
import { OpenApi as request } from "@/utils/request";

/** 部门新增 POST /platform/dept/add */
export async function add11(
  body: API.DeptCreateDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>(`/barter-user/platform/dept/add`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 部门所有 GET /platform/dept/all */
export async function all6(options?: { [key: string]: any }) {
  return request<API.BaseResponseListDeptVo>(`/barter-user/platform/dept/all`, {
    method: "GET",
    ...(options || {}),
  });
}

/** 部门删除 POST /platform/dept/del */
export async function del7(body: API.IdDto, options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean>(`/barter-user/platform/dept/del`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 部门详情 GET /platform/dept/detail */
export async function detail14(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.detail14Params,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseDeptVo>(`/barter-user/platform/dept/detail`, {
    method: "GET",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 部门编辑 POST /platform/dept/edit */
export async function edit13(
  body: API.DeptUpdateDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>(`/barter-user/platform/dept/edit`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 部门列表 GET /platform/dept/list */
export async function listTree3(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listTree3Params,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListDeptVo>(
    `/barter-user/platform/dept/list`,
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}
